package com.lin.controller.commons;

import lombok.Getter;

/**
 * @ClassName ResultCode
 * @Description  统一返回状态码类
 * @Author lin
 * @Date 2022/7/27 下午10:13
 * @Version V1.0
 */

@Getter
public enum ResultCode implements StatusCode{
    SUCCESS(200, "请求成功"),
    FAILED(500, "请求失败"),
    VALIDATE_ERROR(400, "参数校验失败"),
    RESPONSE_PACK_ERROR(1003, "response返回包装失败");

    private int code;
    private String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}